//
//  KKExchangeRateManager.h
//  FreightAssistant
//
//  Created by leo on 15/12/12.
//  Copyright © 2015年 leo. All rights reserved.
//

//  汇率更新

#import <Foundation/Foundation.h>

 static NSString *KKExchangeRateTypeCNY = @"CNY";       /**< 人民币*/
 static NSString *KKExchangeRateTypeUSD = @"USD";       /**< 美元*/
 static NSString *KKExchangeRateTypeHKD = @"HKD";       /**< 港元*/
 static NSString *KKExchangeRateTypeEUR = @"EUR";       /**< 欧元*/
 static NSString *KKExchangeRateTypeGBP = @"GBP";       /**< 英镑*/
 static NSString *KKExchangeRateTypeJPY = @"JPY";       /**< 日元*/
 static NSString *KKExchangeRateTypeAUD = @"AUD";       /**< 澳元*/
 static NSString *KKExchangeRateTypeKRW = @"KRW";       /**< 韩元*/
 static NSString *KKExchangeRateTypeCAD = @"CAD";       /**< 加元*/

@interface KKExchangeRateManager : NSObject

+ (instancetype)defaultManager;

@property (nonatomic, readonly) NSArray *currencyItems;     /**< 币种类型 */

/**
 *  汇率转换
 *
 *  @param fromCurrency 需要被转的货币类型
 *  @param toCurrency   得到的货币类型
 *  @param amount       需要转换的数量
 *
 *  @return 被转后的值
 */
- (double)exchangeValueFromCurrency:(NSString *)fromCurrency toCurrency:(NSString *)toCurrency amount:(double)amount;

/**
 *  更新汇率
 */
- (void)updateExchangeValues;

@end
